// Ofri Keidar 302933981 group 05

package model.database;

/**
 * Exception thrown by the database 
 */
public class DBException extends Exception {

	private static final long serialVersionUID = -2550805130144433001L; // serial number	
	private String errorMsg; // message to describe the error
	
	/**
	 * Constructor- creates a new database exception with given error message
	 * @param errorMSG- message to describe the error occurred
	 */
	public DBException(String errorMSG) {
		// set member as given value
		this.errorMsg = errorMSG;
	}
	
	/**
	 * Returns the error message
	 */
	public String getMessage() {
		return errorMsg;
	}
}